#include <iostream>
#include <string>
#include <string.h>
using namespace std;
class role // （多态类）
{
public:
    virtual void donghua()
    {
        cout << "我是普通角色，哈哈哈哈" << endl;
    }
};

class zhangshi : public role
{
public:
    void donghua()
    {
        cout << "我是战士，乌拉乌拉" << endl;
    }
};

class fashi : public role
{
public:
    void donghua()
    {
        cout << "我是法师，冲冲冲冲" << endl;
    }
};

class a
{
public:
    a()
    {
        
    }
    a(int x)
    {
    }
    a(int x, int y)
    {
    }
};

int main()
{
    cout << "游戏开始，请选择角色:1.普通,2.武士3.法师" << endl;
    while (1)
    {
        int sel;
        cin >> sel;
        role *p;
        if (sel == 1)
        {
            p = new role;
        }
        else if (sel == 2)
        {
            p = new zhangshi;
        }
        else if (sel == 3)
        {
            p = new fashi;
        }
        p->donghua();
    }
}